﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DVDFilmoteka.ServerDatabaseManagement;

namespace DVDFilmoteka.ServerDatabaseManagement
{
    public enum EServerDatabases { CSFD, IMDB, NULL };

    class ServerDatabaseFactory
    {
        private static readonly IServerDatabase csfd = new CSFDServerDatabase();
        private static readonly IServerDatabase imdb = new IMDBServerDatabase();

        public static IServerDatabase getInstance(EServerDatabases type)
        {
            switch (type)
            {
                case EServerDatabases.CSFD:
                    return csfd;
                
                case EServerDatabases.IMDB:
                    return imdb;
                
                default:
                    return null;
                
            }
        }
    }
}